package cn.tianyigps.tianyigpsapiv2.utils;

import com.fasterxml.jackson.databind.JavaType;
import com.fasterxml.jackson.databind.ObjectMapper;

/**
 * Created with IDEA
 * author:guibin.cui
 * Date:2018/6/12
 * Time:20:25
 */
public class JavaTypeUtil {

    public static JavaType getCollectionType(Class<?> collectionClass, Class<?>... elementClasses) {
        ObjectMapper objectMapper = new ObjectMapper();
        return objectMapper.getTypeFactory().constructParametricType(collectionClass, elementClasses);
    }
}
